﻿

using System.ComponentModel.DataAnnotations.Schema;

namespace Company.Database.Entities
{
    /// <summary>
    /// 报警表
    /// </summary>
    [Table(nameof(AlarmEntity))]
    public class AlarmEntity : EntityBase
    {
        private int roomNumber = -1;
        /// <summary>
        /// 房间号
        /// </summary>
        public int RoomNumber
        {
            get => roomNumber;
            set => SetProperty(ref roomNumber, value);
        }

        private string addressNumber = string.Empty;
        /// <summary>
        /// 地址号 格式如 27.00
        /// </summary>
        public string AddressNumber
        {
            get => addressNumber;
            set => SetProperty(ref addressNumber, value);
        }

        private string message = string.Empty;
        /// <summary>
        /// 报警内容
        /// </summary>
        public string Message
        {
            get => message;
            set => SetProperty(ref message, value);
        }

        private DateTime alarmTime = DateTime.Now;
        /// <summary>
        /// 报警时间
        /// </summary>
        public DateTime AlarmTime
        {
            get => alarmTime;
            set => SetProperty(ref alarmTime, value);
        }

        private DateTime resumeTime = DateTime.Now;
        /// <summary>
        /// 恢复正常时间
        /// </summary>
        public DateTime ResumeTime
        {
            get => resumeTime;
            set => SetProperty(ref resumeTime, value);
        }

        private int status = 0;
        /// <summary>
        /// 报警状态 1表示报警中，0表示已恢复
        /// </summary>
        public int Status
        {
            get => status;
            set => SetProperty(ref status, value);
        }

    }
}
